package com.ldk.framework.service;

import java.util.List;

import com.ldk.base.framework.service.IBaseService;
import com.ldk.framework.entity.Menu;

/**
* MenuService接口类
* @author xiangwl
*/
public interface IMenuService extends IBaseService<Menu> {
	/**
	 * 获取用户菜单
	 * @param dbKey
	 * @param roleId 用户角色ID
	 * @return
	 */
	List<Menu> getUserMenus(String dbKey, int roleId);
	
	/**
	 * 获取角色菜单(后台配置的角色菜单)
	 * @param dbKey
	 * @param roleId 角色ID
	 * @return
	 */
	List<Menu> getRoleMenus(String dbKey, int roleId);
	
	/**
	 * 删除菜单
	 * @param dbKey
	 * @param menuId
	 * @return
	 */
	Boolean deleteMenu(String dbKey, int menuId) throws Exception;
	
	/**
	 * 添加菜单
	 * @param entity
	 * @return
	 */
	Boolean addMenu(String dbKey, Menu entity);
	/**
	 * 修改菜单
	 * @param model
	 * @return
	 */
	Boolean updateMenu(String dbKey, Menu entity);
}
